import request from "@/utils/request";
import {
  ReqDmList,
  ReqCompereScripts,
  ReqCompereAddParams,
  ReqCompereEditParams,
} from "./model";

// 获取dm列表
export const reqDmList = (data: PageQuery) => {
  return request<any, PageResult<ReqDmList[]>>({
    url: "/admin/getCompere",
    params: data,
  });
};

// 查询某个主持人带的本
export const reqCompereScripts = (compere_id: number) => {
  return request<any, ReqCompereScripts[]>({
    url: "/admin/compereScripts",
    params: { compere_id },
  });
};

// 添加
export const ReqCompereCreate = (data: ReqCompereAddParams) => {
  return request({
    url: "/admin/compereCreate",
    method: "post",
    data,
  });
};

// 编辑
export const ReqCompereUpdate = (data: ReqCompereEditParams) => {
  return request({
    url: "/admin/compereUpdate",
    method: "post",
    data,
  });
};

// 删除
export const ReqCompereDel = (compere_id: number) => {
  return request({
    url: "/admin/compereDelete",
    params: { compere_id },
  });
};
